﻿Imports System
Imports System.IO
Imports System.Data
Imports System.Data.OleDb

Public Module ConstantesOMANE

#Region "Noms des fichiers et des répertoires OMANE"

#If CompilNA = "True" Then
    Public csteEmplacementProgiciel As String = My.Application.Info.DirectoryPath & "\"
    Public csteEmplacementSorties As String = csteEmplacementProgiciel & "..\..\04_REC_Recette\"
#Else
    Dim emplacementProgiciel As DirectoryInfo = New DirectoryInfo(My.Application.Info.DirectoryPath)
    'Dim csteEmplacementProgiciel As String = emplacementProgiciel.Parent.Parent.Parent.Parent.Parent.FullName & "\"
    Dim csteEmplacementProgiciel As String = _
        New DirectoryInfo(System.IO.Path.Combine( _
                          emplacementProgiciel.FullName, _
                          My.Settings.relpathCsteEmplacementProgiciel)).FullName & "\"
    Public csteEmplacementSorties As String = csteEmplacementProgiciel & "08_Sorties\"
#End If

    'Les sorties du progiciel 
    ''Public csteEmplacementSorties As String = csteEmplacementProgiciel & "08_Sorties\"

    'Les calculs intermédiaires
    Public csteEmplacementCalculsInt As String = csteEmplacementProgiciel & "07_CalculsIntermediaires\"
    Public csteLibSASCalculsInt As String = "libCal"

    'Le référentiel
    Public csteEmplacementReferentiel As String = csteEmplacementProgiciel & "06_Referentiel\"
    Public csteFichSynthReferentiel As String = csteEmplacementReferentiel & "_refTables.xls"
    Public csteLibSASreferentiel As String = "libref"

    'Les données d'encours source
    Public csteEmplacementDefautTbleEncours As String = csteEmplacementProgiciel & "01_BasesEncours\"
    Public csteLibSASEncours As String = "libenc"

    'Le paramétrage
    Public csteEmplacementParametrage As String = csteEmplacementProgiciel & "03_Paramétrage\"
    Public csteNomTbleMortalite As String = csteEmplacementReferentiel & "TblesMortalite.sas7bdat"
    Public csteNomTbleINCINVfra As String = csteEmplacementReferentiel & "TbleINCINVFra.sas7bdat"
    Public csteNomTbleINCINVtaux As String = csteEmplacementReferentiel & "TbleINCINVTaux.sas7bdat"
    Public csteNomRefListeTblesRef As String = csteEmplacementReferentiel & "_refTables.xls"
    Public csteRepertoireTbleTravail As String = csteEmplacementReferentiel

#End Region

#Region "Nom des traitements OMANE"
    Public Const nomTraitTbleTrAge As String = "traitTbleTrAge"
    Public Const nomTraitTbleTrCapi As String = "traitTbleTrCapi"
    Public Const nomTraitTbleEncours As String = "TbleEncours"

    Public Const nomTraitReqSumCapIni As String = "traitReqSumCapIni"
    Public Const nomTraitReqNbPretsXassu As String = "traitReqNbPretsXassu"

    Public Const nomTraitTbleMaintienINCINV_M2 = "TbleMaintienINCINV_M2"
    Public Const nomTraitTbleEncoursPrep1 As String = "traitReqPrepTbleEncours1"
    Public Const nomTraitTbleEncoursPrep2 As String = "traitReqPrepTbleEncours2"
    Public Const nomTraitTbleTravail As String = "traitTableTravail"
    Public Const nomTraitEntreeModeleTxGar As String = "traitReqEntreeModelesTxGar"
    Public Const nomTraitEntreeModeleTxGar1 As String = "TraitEntreeModeleTxGar1"
    Public Const nomTraitTbleEncoursStats As String = "traitReqTbleEncoursStats"
    Public Const nomTraitReqSegmentation As String = "traitReqSegmentation"
    Public Const nomTraitReqSegmentationParamGenerique As String = "traitReqSegmentationParam"
    Public Const nomTraitReqSegmentationParamSensGenerique As String = "traitReqSegmentationParam"
    Public Const nomTraitTbleMortH As String = "traitTbleMortH"
    Public Const nomTraitTbleMortF As String = "traitTbleMortF"
    Public Const nomTraitGrilleTarifaire As String = "traitGrilleTarif"
    Public Const nomTraitMoteurMethode1 As String = "traitMoteurMethode1"
    Public Const nomTraitMoteurMethode2 As String = "traitMoteurMethode2"
    Public Const nomTraitMoteurEcheancier As String = "traitMoteurEcheancier"
#End Region

#Region "Nom des variables et des paramètres OMANE"

    Public Const nomTx_TechA As String = "Tx_TechA"
    Public Const descTx_TechA As String = "Taux technique annuel"
    Public Const nomTx_CommiContA As String = "Tx_CommiContA"
    Public Const descTx_CommiContA As String = "Commission contractante"
    Public Const nomTx_fraiGestA As String = "Tx_fraiGestA"
    Public Const descTx_fraiGestA As String = "Frais de gestion annuels"


    Public Const nomDuree_Actu As String = "Duree_Actu"
    Public Const nomNbPer_Actu As String = "NbPer_Actu"
    Public Const nomTxNom_Actu As String = "TxNom_Actu"
    Public Const nomTxMort_Actu As String = "TxMort_Actu"
    Public Const nomPComDC_Non_Derog_Actu As String = "PComDC_Non_Derog_ACTU"
    Public Const nomPourDC_Derog_Actu As String = "PourDC_Derog_ACTU"
    Public Const nomPComDC_Derog_Actu As String = "PComDC_Derog_ACTU"
    Public Const nomPComINCINV_Non_Derog_Actu As String = "PComINCINV_Non_Derog_ACTU"
    Public Const nomPourINCINV_Derog_Actu As String = "PourINCINV_Derog_ACTU"
    Public Const nomPComINCINV_Derog_Actu As String = "PComINCINV_Derog_ACTU"
    Public Const nomSumCSR As String = "CSR"
    Public Const nomSumCapIni As String = "Sum" & nomCapIni
    Public Const nomNbPretsXassu As String = "nbPretsXassu"

    Public Const descDuree_Actu As String = "Duree actuarielle"
    Public Const descTxNom_Actu As String = "Taux nominal actuariel"
    Public Const descTxMort_Actu As String = "Taux de mortalité actuariel"
    Public Const descPComDC_Non_Derog_Actu As String = "Prime commerciale DC non dérogée pondérée par les CSR"
    Public Const descPourDC_Derog_Actu As String = "Pourcentage de dérogations DC pondérées par les CSR"
    Public Const descPComDC_Derog_Actu As String = "Prime commerciale DC dérogée pondérée par les CSR"
    Public Const descPComINCINV_Non_Derog_Actu As String = "Prime commerciale INCINV non dérogée pondérée par les CSR"
    Public Const descPourINCINV_Derog_Actu As String = "Pourcentage de dérogations INCINV pondérées par les CSR"
    Public Const descPComINCINV_Derog_Actu As String = "Prime commerciale INCINV dérogée pondérée par les CSR"
    Public Const descSumCSR As String = "CSR"
    Public Const descSumCapIni As String = "Somme des capitaux initiaux"
    Public Const descNbPretsXassu As String = "Nombre de prêts X assurés"


    Public Const nomIdReseau As String = "id_reseau"
    Public Const descIdReseau As String = "Identifiant Réseau"
    Public Const nomIdPArtenaire As String = "id_partenaire"
    Public Const descIdPArtenaire As String = "Identifiant Partenaire"
    Public Const descIdPret As String = "Identifiant Prêt"
    Public Const nomIdPret As String = "id_pret"
    Public Const descIdAssure As String = "Identifiant Assuré"
    Public Const nomIdAssure As String = "id_assure"
    Public Const desctrAge As String = "Tranche d'âge"
    Public Const nomtrAge As String = "tr_age"
    Public Const descCapIni As String = "Capital Initial"
    Public Const nomCapIni As String = "cap_ini"
    Public Const descDateNaiss As String = "Date de naissance Assuré"
    Public Const nomDateNaiss As String = "dt_nais_assu"
    Public Const descDateFinPret As String = "Date fin prêt"
    Public Const nomDateFinPret As String = "dt_fin_pret"
    Public Const descIdTypePret As String = "Identifiant type de prêt"
    Public Const nomTypePret As String = "id_type_pret"
    Public Const descDateDebloFonds As String = "Date de déblocage des fonds"
    Public Const nomDateDebloFonds As String = "dt_debloc_fonds"
    Public Const descTauxSurprime As String = "Taux de surprime"
    Public Const nomTauxSurprime As String = "tx_surprime"
    Public Const descDuree As String = "Durée en mois"
    Public Const nomDureeMois As String = "duree_mois"
    Public Const descCapAssure As String = "Capital assuré"
    Public Const nomCapAssure As String = "cap_assu"
    Public Const descQuotiteAssuree As String = "Quotité assurée"
    Public Const nomQuotiteAssuree As String = "quotite_assu"
    Public Const descTauxCotisation As String = "Taux de cotisation"
    Public Const nomTauxCotisation As String = "tx_cotis"
    Public Const descTauxNominal As String = "Taux nominal du prêt"
    Public Const nomTauxNominal As String = "tx_nominal"
    Public Const descCategoriePret As String = "Catégorie de prêt"
    Public Const nomCategoriePret As String = "cat_pret"
    Public Const descIdOption As String = "Identifiant option"
    Public Const nomIdOption As String = "id_option"
    Public Const descSexeAssu As String = "Sexe de l'assuré"
    Public Const nomSexeAssu As String = "sexe_assu"


    Public Const nomPComDC_Non_Derog As String = "PComDC_Non_Derog"
    Public Const nomPourDC_Derog As String = "PourDC_Derog"
    Public Const nomPComDC_Derog As String = "PComDC_Derog"
    Public Const nomPComINCINV_Non_Derog As String = "PComINCINV_Non_Derog"
    Public Const nomPourINCINV_Derog As String = "PourINCINV_derog"
    Public Const nomPComINCINV_Derog As String = "PComINCINV_derog"

    Public Const descPComDC_Non_Derog As String = "Prime commercial DC non dérogée"
    Public Const descPourDC_Derog As String = "Pourcentage de dérogations DC"
    Public Const descPComDC_Derog As String = "Prime commercial DC dérogée moyenne"
    Public Const descPComINCINV_Non_Derog As String = "Prime commercial INCINV non dérogée"
    Public Const descPourINCINV_Derog As String = "Pourcentage de dérogations INCINV"
    Public Const descPComINCINV_Derog As String = "Prime commercial INCINV dérogée"

    Public Const nomAgeAnEntier As String = "AGE_AN"
    Public Const descAgeAnEntier As String = "Age en années"
    Public Const nomAgeAnExact As String = "AGE_AN_EX"
    Public Const descAgeAnExact As String = "Age exact en années"

    Public Const nomAgeSousAnEntier As String = "AGE_SOUS_AN"
    Public Const descAgeSousAnEntier As String = "Age à la souscription en années"
    Public Const nomAgeSousAnExact As String = "AGE_SOUS_AN_EX"
    Public Const descAgeSousAnExact As String = "Age exact à la souscription en années"


    Public Const nomTxMortAn As String = "TX_MORT_AN"
    Public Const descTxMortAn As String = "Taux de mortalité annuel"
#End Region

#Region "API"

    'Public Declare Function setSysColors Lib "user32" Alias "setSysColors" (ByVal nchanges As Integer, _
    'ByVal lpSysColor As Integer, _
    'ByVal lpColorValues As Integer) _
    'As Integer
    Public Declare Function getSysColorLib Lib "user32" Alias "getSysColors" (ByVal nindex As Integer) _
                                                                              As Integer
    'Public Const csteCOLOR_ACTIVECAPTION = 2
    'r=setSysColors(1,csteCOLOR_ACTIVECAPTION,Col&)
    'getSysColorLib(csteCOLOR_ACTIVECAPTION)
  
#End Region

End Module

